<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>递归函数- 阶乘函数</title>
</head>
<body>
<script>
    function jc(n) {
        if(n == 1){
            return 1;
        }else{
            return n * jc(n - 1);
        }
    }
    console.log(jc(5));
</script>
</body>
</html>